home *** CD-ROM | disk | FTP | other *** search
/ FM Towns: Free Software Collection 11 / FM Towns Free Software Collection 11.iso / t_os / tool / dolmorph / src / zpoints.c < prev    next >
Encoding:
C/C++ Source or Header  |  1995-01-19  |  13.2 KB  |  577 lines

  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <winb.h>
  4. #include <te.h>
  5. #include <fntb.h>
  6. #include <gui.h>
  7.  
  8. extern int    idPointsWin ;
  9. extern int    PointsWinFunc() ;
  10. extern int    idPointsTitleDBtn ;
  11. extern int    idPointsTitleMsg ;
  12. extern int    idPointsTypeTIcon[2] ;
  13. extern int    PointsTypeTIconFunc() ;
  14. extern int    idPointsCommandTIcon[3] ;
  15. extern int    PointsCommandTIconFunc() ;
  16. extern int    idPointsEditDBtn[6] ;
  17. extern int    PointsEditDBtnFunc() ;
  18. extern int    idPointsEditMsg[6] ;
  19. extern int    idPointsDarkTIcon[2] ;
  20. extern int    PointsDarkTIconFunc() ;
  21. extern int    idPointsDarkMsg[2] ;
  22.  
  23. #define ALIGN    4
  24. #define OFFSET(type) (sizeof(MMIPACKET) + (sizeof(type)+ALIGN-1)/ALIGN*ALIGN)
  25.  
  26. /*    MMI_init 用データ    */
  27.  
  28. /*    ヘッダ    */
  29.  
  30. MMIINIT    initDataZPOINTS = { "MmiInit",  34, 0 } ;
  31.  
  32. /* idPointsWin */
  33.  
  34. static MMIPACKET d001 = {    &idPointsWin,
  35.                             NULL,
  36.                             &MJ_WINDOWL40,
  37.                             OFFSET(WINDOWL40),
  38.                             MS_NONE
  39.                         } ;
  40. static WINDOWL40    d001d = {    MS_BTLEFTL40 | MS_EVMOSONL40 | MS_HIDEL40,
  41.                                0,  20, 297, 479, 8, 6, 8,
  42.                             MS_UFRAMEL40 | MS_FRAMEL40,
  43.                             NULL,   0,   0,
  44.                               48,  68, 240, 386,
  45.                              128,  96, 640, 480,
  46.                             PointsWinFunc,
  47.                             "ウィンドウ",
  48.                         } ;
  49.  
  50. /* idPointsTitleDBtn */
  51.  
  52. static MMIPACKET d002 = {    &idPointsTitleDBtn,
  53.                             &idPointsWin,
  54.                             &MJ_DBUTTONL40,
  55.                             OFFSET(DBUTTONL40),
  56.                             MS_NONE
  57.                         } ;
  58. static DBUTTONL40    d002d = {    MS_BTLEFTL40 | MS_EVMOSOFFL40 | MS_EVKEYONL40 | MS_DSPONLYL40,
  59.                                1,  21, 296,  36, 8, 6, 8,
  60.                             MS_UFRAMEL40 | MS_FRAMEL40,
  61.                             0,
  62.                             0x0000
  63.                         } ;
  64.  
  65. /* idPointsTitleMsg */
  66.  
  67. static MMIPACKET d003 = {    &idPointsTitleMsg,
  68.                             &idPointsWin,
  69.                             &MJ_MSGL40,
  70.                             OFFSET(MSGL40),
  71.                             MS_NONE
  72.                         } ;
  73. static MSGL40    d003d =     {    MS_LEFTL40 | MS_DSPONLYL40,
  74.                               16,  23,  91,  34, 8, 6, 8,
  75.                             MS_NONEL40,
  76.                             "操作点設定",
  77.                                1,  12,  12,
  78.                             MS_NONEL40,
  79.                                0,   0
  80.                         } ;
  81.  
  82. /* idPointsTypeTIcon[0] */
  83.  
  84. static MMIPACKET d004 = {    &idPointsTypeTIcon[0],
  85.                             &idPointsWin,
  86.                             &MJ_TICONL40,
  87.                             OFFSET(TICONL40),
  88.                             MS_NONE
  89.                         } ;
  90. static TICONL40    d004d = {    MS_BTLEFTL40 | MS_EVMOSOFFL40 | MS_EVKEYONL40 | MS_LEFTL40,
  91.                               96,  44, 129,  59, 8, 6, 8,
  92.                             MS_NONEL40,
  93.                             PointsTypeTIconFunc,
  94.                             0x0000, 259, 260
  95.                         } ;
  96.  
  97. /* idPointsTypeTIcon[1] */
  98.  
  99. static MMIPACKET d005 = {    &idPointsTypeTIcon[1],
  100.                             &idPointsWin,
  101.                             &MJ_TICONL40,
  102.                             OFFSET(TICONL40),
  103.                             MS_NONE
  104.                         } ;
  105. static TICONL40    d005d = {    MS_BTLEFTL40 | MS_EVMOSOFFL40 | MS_EVKEYONL40 | MS_LEFTL40,
  106.                              156,  44, 195,  59, 8, 6, 8,
  107.                             MS_NONEL40,
  108.                             PointsTypeTIconFunc,
  109.                             0x0000, 259, 260
  110.                         } ;
  111.  
  112. /* idPointsCommandTIcon[0] */
  113.  
  114. static MMIPACKET d006 = {    &idPointsCommandTIcon[0],
  115.                             &idPointsWin,
  116.                             &MJ_TICONL40,
  117.                             OFFSET(TICONL40),
  118.                             MS_NONE
  119.                         } ;
  120. static TICONL40    d006d = {    MS_BTLEFTL40 | MS_EVMOSOFFL40 | MS_EVKEYONL40 | MS_LEFTL40,
  121.                               96,  62, 175,  77, 8, 6, 8,
  122.                             MS_NONEL40,
  123.                             PointsCommandTIconFunc,
  124.                             0x0000, 259, 260
  125.                         } ;
  126.  
  127. /* idPointsCommandTIcon[1] */
  128.  
  129. static MMIPACKET d007 = {    &idPointsCommandTIcon[1],
  130.                             &idPointsWin,
  131.                             &MJ_TICONL40,
  132.                             OFFSET(TICONL40),
  133.                             MS_NONE
  134.                         } ;
  135. static TICONL40    d007d = {    MS_BTLEFTL40 | MS_EVMOSOFFL40 | MS_EVKEYONL40 | MS_LEFTL40,
  136.                              178,  62, 241,  77, 8, 6, 8,
  137.                             MS_NONEL40,
  138.                             PointsCommandTIconFunc,
  139.                             0x0000, 259, 260
  140.                         } ;
  141.  
  142. /* NULL */
  143.  
  144. static MMIPACKET d008 = {    NULL,
  145.                             &idPointsWin,
  146.                             &MJ_MSGL40,
  147.                             OFFSET(MSGL40),
  148.                             MS_NONE
  149.                         } ;
  150. static MSGL40    d008d =     {    MS_LEFTL40 | MS_DSPONLYL40,
  151.                              172,  44, 219,  59, 8, 6, 8,
  152.                             MS_NONEL40,
  153.                             "線分",
  154.                                1,  12,  12,
  155.                             MS_NONEL40,
  156.                                0,   0
  157.                         } ;
  158.  
  159. /* NULL */
  160.  
  161. static MMIPACKET d009 = {    NULL,
  162.                             &idPointsWin,
  163.                             &MJ_MSGL40,
  164.                             OFFSET(MSGL40),
  165.                             MS_NONE
  166.                         } ;
  167. static MSGL40    d009d =     {    MS_LEFTL40 | MS_DSPONLYL40,
  168.                                4,  44,  83,  59, 8, 6, 8,
  169.                             MS_NONEL40,
  170.                             "操作点タイプ",
  171.                                1,  12,  12,
  172.                             MS_NONEL40,
  173.                                0,   0
  174.                         } ;
  175.  
  176. /* NULL */
  177.  
  178. static MMIPACKET d010 = {    NULL,
  179.                             &idPointsWin,
  180.                             &MJ_MSGL40,
  181.                             OFFSET(MSGL40),
  182.                             MS_NONE
  183.                         } ;
  184. static MSGL40    d010d =     {    MS_LEFTL40 | MS_DSPONLYL40,
  185.                              112,  44, 159,  59, 8, 6, 8,
  186.                             MS_NONEL40,
  187.                             "点",
  188.                                1,  12,  12,
  189.                             MS_NONEL40,
  190.                                0,   0
  191.                         } ;
  192.  
  193. /* NULL */
  194.  
  195. static MMIPACKET d011 = {    NULL,
  196.                             &idPointsWin,
  197.                             &MJ_MSGL40,
  198.                             OFFSET(MSGL40),
  199.                             MS_NONE
  200.                         } ;
  201. static MSGL40    d011d =     {    MS_LEFTL40 | MS_DSPONLYL40,
  202.                                4,  62,  91,  77, 8, 6, 8,
  203.                             MS_NONEL40,
  204.                             "操作点コマンド",
  205.                                1,  12,  12,
  206.                             MS_NONEL40,
  207.                                0,   0
  208.                         } ;
  209.  
  210. /* NULL */
  211.  
  212. static MMIPACKET d012 = {    NULL,
  213.                             &idPointsWin,
  214.                             &MJ_MSGL40,
  215.                             OFFSET(MSGL40),
  216.                             MS_NONE
  217.                         } ;
  218. static MSGL40    d012d =     {    MS_LEFTL40 | MS_DSPONLYL40,
  219.                              112,  62, 175,  77, 8, 6, 8,
  220.                             MS_NONEL40,
  221.                             "作成・移動",
  222.                                1,  12,  12,
  223.                             MS_NONEL40,
  224.                                0,   0
  225.                         } ;
  226.  
  227. /* NULL */
  228.  
  229. static MMIPACKET d013 = {    NULL,
  230.                             &idPointsWin,
  231.                             &MJ_MSGL40,
  232.                             OFFSET(MSGL40),
  233.                             MS_NONE
  234.                         } ;
  235. static MSGL40    d013d =     {    MS_LEFTL40 | MS_DSPONLYL40,
  236.                              194,  62, 225,  77, 8, 6, 8,
  237.                             MS_NONEL40,
  238.                             "移動のみ",
  239.                                1,  12,  12,
  240.                             MS_NONEL40,
  241.                                0,   0
  242.                         } ;
  243.  
  244. /* idPointsCommandTIcon[2] */
  245.  
  246. static MMIPACKET d014 = {    &idPointsCommandTIcon[2],
  247.                             &idPointsWin,
  248.                             &MJ_TICONL40,
  249.                             OFFSET(TICONL40),
  250.                             MS_NONE
  251.                         } ;
  252. static TICONL40    d014d = {    MS_BTLEFTL40 | MS_EVMOSOFFL40 | MS_EVKEYONL40 | MS_LEFTL40,
  253.                              248,  62, 287,  77, 8, 6, 8,
  254.                             MS_NONEL40,
  255.                             PointsCommandTIconFunc,
  256.                             0x0000, 259, 260
  257.                         } ;
  258.  
  259. /* NULL */
  260.  
  261. static MMIPACKET d015 = {    NULL,
  262.                             &idPointsWin,
  263.                             &MJ_MSGL40,
  264.                             OFFSET(MSGL40),
  265.                             MS_NONE
  266.                         } ;
  267. static MSGL40    d015d =     {    MS_LEFTL40 | MS_DSPONLYL40,
  268.                              264,  62, 293,  77, 8, 6, 8,
  269.                             MS_NONEL40,
  270.                             "消去",
  271.                                1,  12,  12,
  272.                             MS_NONEL40,
  273.                                0,   0
  274.                         } ;
  275.  
  276. /* idPointsEditDBtn[0] */
  277.  
  278. static MMIPACKET d016 = {    &idPointsEditDBtn[0],
  279.                             &idPointsWin,
  280.                             &MJ_DBUTTONL40,
  281.                             OFFSET(DBUTTONL40),
  282.                             MS_NONE
  283.                         } ;
  284. static DBUTTONL40    d016d = {    MS_BTLEFTL40 | MS_EVMOSOFFL40 | MS_EVKEYONL40,
  285.                                6, 216,  45, 231, 8, 6, 8,
  286.                             MS_UFRAMEL40 | MS_FRAMEL40,
  287.                             PointsEditDBtnFunc,
  288.                             0x0000
  289.                         } ;
  290.  
  291. /* idPointsEditDBtn[1] */
  292.  
  293. static MMIPACKET d017 = {    &idPointsEditDBtn[1],
  294.                             &idPointsWin,
  295.                             &MJ_DBUTTONL40,
  296.                             OFFSET(DBUTTONL40),
  297.                             MS_NONE
  298.                         } ;
  299. static DBUTTONL40    d017d = {    MS_BTLEFTL40 | MS_EVMOSOFFL40 | MS_EVKEYONL40,
  300.                                6, 234,  45, 249, 8, 6, 8,
  301.                             MS_UFRAMEL40 | MS_FRAMEL40,
  302.                             PointsEditDBtnFunc,
  303.                             0x0000
  304.                         } ;
  305.  
  306. /* idPointsEditDBtn[2] */
  307.  
  308. static MMIPACKET d018 = {    &idPointsEditDBtn[2],
  309.                             &idPointsWin,
  310.                             &MJ_DBUTTONL40,
  311.                             OFFSET(DBUTTONL40),
  312.                             MS_NONE
  313.                         } ;
  314. static DBUTTONL40    d018d = {    MS_BTLEFTL40 | MS_EVMOSOFFL40 | MS_EVKEYONL40,
  315.                                6, 252,  45, 267, 8, 6, 8,
  316.                             MS_UFRAMEL40 | MS_FRAMEL40,
  317.                             PointsEditDBtnFunc,
  318.                             0x0000
  319.                         } ;
  320.  
  321. /* idPointsEditDBtn[3] */
  322.  
  323. static MMIPACKET d019 = {    &idPointsEditDBtn[3],
  324.                             &idPointsWin,
  325.                             &MJ_DBUTTONL40,
  326.                             OFFSET(DBUTTONL40),
  327.                             MS_NONE
  328.                         } ;
  329. static DBUTTONL40    d019d = {    MS_BTLEFTL40 | MS_EVMOSOFFL40 | MS_EVKEYONL40,
  330.                                6, 422,  45, 437, 8, 6, 8,
  331.                             MS_UFRAMEL40 | MS_FRAMEL40,
  332.                             PointsEditDBtnFunc,
  333.                             0x0000
  334.                         } ;
  335.  
  336. /* idPointsEditDBtn[4] */
  337.  
  338. static MMIPACKET d020 = {    &idPointsEditDBtn[4],
  339.                             &idPointsWin,
  340.                             &MJ_DBUTTONL40,
  341.                             OFFSET(DBUTTONL40),
  342.                             MS_NONE
  343.                         } ;
  344. static DBUTTONL40    d020d = {    MS_BTLEFTL40 | MS_EVMOSOFFL40 | MS_EVKEYONL40,
  345.                                6, 440,  45, 455, 8, 6, 8,
  346.                             MS_UFRAMEL40 | MS_FRAMEL40,
  347.                             PointsEditDBtnFunc,
  348.                             0x0000
  349.                         } ;
  350.  
  351. /* idPointsEditDBtn[5] */
  352.  
  353. static MMIPACKET d021 = {    &idPointsEditDBtn[5],
  354.                             &idPointsWin,
  355.                             &MJ_DBUTTONL40,
  356.                             OFFSET(DBUTTONL40),
  357.                             MS_NONE
  358.                         } ;
  359. static DBUTTONL40    d021d = {    MS_BTLEFTL40 | MS_EVMOSOFFL40 | MS_EVKEYONL40,
  360.                                6, 458,  45, 473, 8, 6, 8,
  361.                             MS_UFRAMEL40 | MS_FRAMEL40,
  362.                             PointsEditDBtnFunc,
  363.                             0x0000
  364.                         } ;
  365.  
  366. /* idPointsEditMsg[0] */
  367.  
  368. static MMIPACKET d022 = {    &idPointsEditMsg[0],
  369.                             &idPointsWin,
  370.                             &MJ_MSGL40,
  371.                             OFFSET(MSGL40),
  372.                             MS_NONE
  373.                         } ;
  374. static MSGL40    d022d =     {    MS_CENTERL40 | MS_DSPONLYL40,
  375.                                8, 218,  43, 229, 8, 6, 8,
  376.                             MS_NONEL40,
  377.                             "cut",
  378.                                1,  12,  12,
  379.                             MS_NONEL40,
  380.                                0,   0
  381.                         } ;
  382.  
  383. /* idPointsEditMsg[1] */
  384.  
  385. static MMIPACKET d023 = {    &idPointsEditMsg[1],
  386.                             &idPointsWin,
  387.                             &MJ_MSGL40,
  388.                             OFFSET(MSGL40),
  389.                             MS_NONE
  390.                         } ;
  391. static MSGL40    d023d =     {    MS_CENTERL40 | MS_DSPONLYL40,
  392.                                8, 236,  43, 247, 8, 6, 8,
  393.                             MS_NONEL40,
  394.                             "copy",
  395.                                1,  12,  12,
  396.                             MS_NONEL40,
  397.                                0,   0
  398.                         } ;
  399.  
  400. /* idPointsEditMsg[2] */
  401.  
  402. static MMIPACKET d024 = {    &idPointsEditMsg[2],
  403.                             &idPointsWin,
  404.                             &MJ_MSGL40,
  405.                             OFFSET(MSGL40),
  406.                             MS_NONE
  407.                         } ;
  408. static MSGL40    d024d =     {    MS_CENTERL40 | MS_DSPONLYL40,
  409.                                8, 254,  43, 265, 8, 6, 8,
  410.                             MS_NONEL40,
  411.                             "paste",
  412.                                1,  12,  12,
  413.                             MS_NONEL40,
  414.                                0,   0
  415.                         } ;
  416.  
  417. /* idPointsEditMsg[3] */
  418.  
  419. static MMIPACKET d025 = {    &idPointsEditMsg[3],
  420.                             &idPointsWin,
  421.                             &MJ_MSGL40,
  422.                             OFFSET(MSGL40),
  423.                             MS_NONE
  424.                         } ;
  425. static MSGL40    d025d =     {    MS_CENTERL40 | MS_DSPONLYL40,
  426.                                8, 424,  43, 435, 8, 6, 8,
  427.                             MS_NONEL40,
  428.                             "cut",
  429.                                1,  12,  12,
  430.                             MS_NONEL40,
  431.                                0,   0
  432.                         } ;
  433.  
  434. /* idPointsEditMsg[4] */
  435.  
  436. static MMIPACKET d026 = {    &idPointsEditMsg[4],
  437.                             &idPointsWin,
  438.                             &MJ_MSGL40,
  439.                             OFFSET(MSGL40),
  440.                             MS_NONE
  441.                         } ;
  442. static MSGL40    d026d =     {    MS_CENTERL40 | MS_DSPONLYL40,
  443.                                8, 442,  43, 453, 8, 6, 8,
  444.                             MS_NONEL40,
  445.                             "copy",
  446.                                1,  12,  12,
  447.                             MS_NONEL40,
  448.                                0,   0
  449.                         } ;
  450.  
  451. /* idPointsEditMsg[5] */
  452.  
  453. static MMIPACKET d027 = {    &idPointsEditMsg[5],
  454.                             &idPointsWin,
  455.                             &MJ_MSGL40,
  456.                             OFFSET(MSGL40),
  457.                             MS_NONE
  458.                         } ;
  459. static MSGL40    d027d =     {    MS_CENTERL40 | MS_DSPONLYL40,
  460.                                8, 460,  43, 471, 8, 6, 8,
  461.                             MS_NONEL40,
  462.                             "paste",
  463.                                1,  12,  12,
  464.                             MS_NONEL40,
  465.                                0,   0
  466.                         } ;
  467.  
  468. /* NULL */
  469.  
  470. static MMIPACKET d028 = {    NULL,
  471.                             &idPointsWin,
  472.                             &MJ_ICONL40,
  473.                             OFFSET(ICONL40),
  474.                             MS_NONE
  475.                         } ;
  476. static ICONL40    d028d =     {    MS_BTLEFTL40 | MS_EVMOSOFFL40 | MS_EVKEYONL40 | MS_LEFTL40 | MS_DSPONLYL40,
  477.                               10,  88,  41, 119, 8, 6, 8,
  478.                             MS_NONEL40,
  479.                             0,
  480.                             0x0000, 513
  481.                         } ;
  482.  
  483. /* NULL */
  484.  
  485. static MMIPACKET d029 = {    NULL,
  486.                             &idPointsWin,
  487.                             &MJ_ICONL40,
  488.                             OFFSET(ICONL40),
  489.                             MS_NONE
  490.                         } ;
  491. static ICONL40    d029d =     {    MS_BTLEFTL40 | MS_EVMOSOFFL40 | MS_EVKEYONL40 | MS_LEFTL40 | MS_DSPONLYL40,
  492.                               10, 294,  41, 325, 8, 6, 8,
  493.                             MS_NONEL40,
  494.                             0,
  495.                             0x0000, 514
  496.                         } ;
  497.  
  498. /* NULL */
  499.  
  500. static MMIPACKET d030 = {    NULL,
  501.                             &idPointsWin,
  502.                             &MJ_ICONL40,
  503.                             OFFSET(ICONL40),
  504.                             MS_NONE
  505.                         } ;
  506. static ICONL40    d030d =     {    MS_BTLEFTL40 | MS_EVMOSOFFL40 | MS_EVKEYONL40 | MS_LEFTL40 | MS_DSPONLYL40,
  507.                              152, 271, 183, 290, 8,12, 8,
  508.                             MS_NONEL40,
  509.                             0,
  510.                             0x0000, 512
  511.                         } ;
  512.  
  513. /* idPointsDarkTIcon[0] */
  514.  
  515. static MMIPACKET d031 = {    &idPointsDarkTIcon[0],
  516.                             &idPointsWin,
  517.                             &MJ_TICONL40,
  518.                             OFFSET(TICONL40),
  519.                             MS_NONE
  520.                         } ;
  521. static TICONL40    d031d = {    MS_BTLEFTL40 | MS_EVMOSOFFL40 | MS_EVKEYONL40 | MS_LEFTL40 | MS_DSPONLYL40,
  522.                                8, 188,  43, 203, 8, 6, 6,
  523.                             MS_NONEL40,
  524.                             PointsDarkTIconFunc,
  525.                             0x0000, 261, 262
  526.                         } ;
  527.  
  528. /* idPointsDarkMsg[0] */
  529.  
  530. static MMIPACKET d032 = {    &idPointsDarkMsg[0],
  531.                             &idPointsWin,
  532.                             &MJ_MSGL40,
  533.                             OFFSET(MSGL40),
  534.                             MS_NONE
  535.                         } ;
  536. static MSGL40    d032d =     {    MS_LEFTL40 | MS_DSPONLYL40,
  537.                               28, 188,  43, 203, 6, 6, 6,
  538.                             MS_NONEL40,
  539.                             "  ",
  540.                                1,  12,  12,
  541.                             MS_NONEL40,
  542.                                0,   0
  543.                         } ;
  544.  
  545. /* idPointsDarkTIcon[1] */
  546.  
  547. static MMIPACKET d033 = {    &idPointsDarkTIcon[1],
  548.                             &idPointsWin,
  549.                             &MJ_TICONL40,
  550.                             OFFSET(TICONL40),
  551.                             MS_NONE
  552.                         } ;
  553. static TICONL40    d033d = {    MS_BTLEFTL40 | MS_EVMOSOFFL40 | MS_EVKEYONL40 | MS_LEFTL40 | MS_DSPONLYL40,
  554.                                8, 396,  43, 411, 8, 6, 6,
  555.                             MS_NONEL40,
  556.                             PointsDarkTIconFunc,
  557.                             0x0000, 261, 262
  558.                         } ;
  559.  
  560. /* idPointsDarkMsg[1] */
  561.  
  562. static MMIPACKET d034 = {    &idPointsDarkMsg[1],
  563.                             &idPointsWin,
  564.                             &MJ_MSGL40,
  565.                             0,
  566.                             MS_NONE
  567.                         } ;
  568. static MSGL40    d034d =     {    MS_LEFTL40 | MS_DSPONLYL40,
  569.                               28, 396,  43, 411, 6, 6, 6,
  570.                             MS_NONEL40,
  571.                             "  ",
  572.                                1,  12,  12,
  573.                             MS_NONEL40,
  574.                                0,   0
  575.                         } ;
  576.  
  577.